/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.ebc.icontatos.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Temporal;

/**
 *
 * @author linux
 */
@Entity
public class Boletim implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long idBoletim;

    private String titulo;

    private String enderecoBoletim;

    @Temporal(javax.persistence.TemporalType.DATE)
    private Date dataCadastroBoletim;

    @Temporal(javax.persistence.TemporalType.DATE)
    private Date dataBoletim;

	public Boletim() {
	}

	public Long getIdBoletim() {
		return idBoletim;
	}

	public void setIdBoletim(Long idBoletim) {
		this.idBoletim = idBoletim;
	}

	public String getTitulo() {
		return titulo;
	}

	public void setTitulo(String titulo) {
		this.titulo = titulo;
	}

	public String getEnderecoBoletim() {
		return enderecoBoletim;
	}

	public void setEnderecoBoletim(String enderecoBoletim) {
		this.enderecoBoletim = enderecoBoletim;
	}

	public Date getDataCadastroBoletim() {
		return dataCadastroBoletim;
	}

	public void setDataCadastroBoletim(Date dataCadastroBoletim) {
		this.dataCadastroBoletim = dataCadastroBoletim;
	}

	public Date getDataBoletim() {
		return dataBoletim;
	}

	public void setDataBoletim(Date dataBoletim) {
		this.dataBoletim = dataBoletim;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((dataBoletim == null) ? 0 : dataBoletim.hashCode());
		result = prime
				* result
				+ ((dataCadastroBoletim == null) ? 0 : dataCadastroBoletim
						.hashCode());
		result = prime * result
				+ ((enderecoBoletim == null) ? 0 : enderecoBoletim.hashCode());
		result = prime * result
				+ ((idBoletim == null) ? 0 : idBoletim.hashCode());
		result = prime * result + ((titulo == null) ? 0 : titulo.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Boletim other = (Boletim) obj;
		if (dataBoletim == null) {
			if (other.dataBoletim != null)
				return false;
		} else if (!dataBoletim.equals(other.dataBoletim))
			return false;
		if (dataCadastroBoletim == null) {
			if (other.dataCadastroBoletim != null)
				return false;
		} else if (!dataCadastroBoletim.equals(other.dataCadastroBoletim))
			return false;
		if (enderecoBoletim == null) {
			if (other.enderecoBoletim != null)
				return false;
		} else if (!enderecoBoletim.equals(other.enderecoBoletim))
			return false;
		if (idBoletim == null) {
			if (other.idBoletim != null)
				return false;
		} else if (!idBoletim.equals(other.idBoletim))
			return false;
		if (titulo == null) {
			if (other.titulo != null)
				return false;
		} else if (!titulo.equals(other.titulo))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Boletim [idBoletim=" + idBoletim + "]";
	}

}
